import request from "../utils/request.js";
//获取所有
export function getAll() {
    return request({
        url: "/content/getlist/",
        method: "GET",
    });
}
// 获取列表
export function getTerritoryList(data) {
    return request({
        url: "/content/positions/",
        method: "GET",
        params:data
    });
}

// 添加
export function addTerritory(data) {
    return request({
        url: "/content/positions/",
        method: "POST",
        headers: {
            'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'
        },
        data,
    });
}

// 删除
export function deleteTerritory(id) {
    return request({
        url: "/content/positions/" + id,
        method: "DELETE",
    });
}

// 修改
export function PutTerritory(id, data) {
    return request({
        url: "/content/positions/" + id + '/',
        method: "PUT",
        headers: {
            'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'
        },
        data
    });
}


